package com.wanmait.community.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wanmait.community.entity.Member;
import com.wanmait.community.mapper.MemberMapper;
import com.wanmait.community.service.MemberService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
    @Resource
    private MemberMapper memberMapper;
    @Override
    public List<Member> getMembers() {
        List<Member> members = memberMapper.selectList(null);
        System.out.println(members);
        return members;
    }
}
